﻿/**
 * @file hal_key.h
 * @brief this is a brief description
 * @details this is the detail description.
 * @author fulong 
 * @data 8/1/2014
 * @version 1.0
 * @par Copyright (c):
 * @par First build
 *     version: fulong 
 *     data: 8/1/2014
 */
#ifndef __HAL_KEY_H__
#define __HAL_KEY_H__
#include "../hal_include/hal_types.h"


#define KEY0 0x01
#define KEY1 0x02
#define KEY2 0x04
#define KEY3 0x08
#define KEY4 0x10
#define KEY5 0x20
#define KEY6 0x40
#define KEY7 0x80
#define HAL_KEY_LEN_MAX 10
#define HAL_KEY_UNPRESS   KEY_UNPRESS

typedef enum {
    HAL_KEY_UNPRESS_STATUS,
    HAL_KEY_CONTINUE_PRESS_STATUS,
    HAL_KEY_PRESS_STATUS
}KEY_STATUS_STRUCT;
typedef struct {
    uint32 hal_key_saved[ HAL_KEY_LEN_MAX ];
    uint8 hal_key_status[ HAL_KEY_LEN_MAX ];
    uint8 hal_key_len;
}hal_key_struct;

extern void update_key_value(uint8 used_key_id);
extern void query_key_status(void);
extern void hal_key_init(void);
extern void clr_unuse_key_value(void);

#endif /* __HAL_KEY_H__ */


